package GradeCalculation;

import java.util.List;

public class GradeCounter {
    GradeCount gradeCount;

    public void setGradeCounter(GradeCount gradeCount) {
        this.gradeCount = gradeCount;
    }

    public void show(List<Double> score){
        if(gradeCount != null){
            System.out.println("现在计算的是 "+gradeCount.getName()+" 成绩," +
                    "平均成绩: "+ String.format("%.2f",gradeCount.averageScore(score)));
        }else{
            System.out.println("请先设置成绩计算方式");
        }
    }
}
